package datatypes;

import java.util.List;
import java.util.Set;

import org.zkoss.image.Image;

/**
 * Represent a MultipleChoiceQuestion
 * @author Rupert
 *
 */
public class ImageMultipleChoiceQuestion {
	private int id;
	private String question;
	private List<Image> answerPossibilities;
	private List<String> answerPossibilitiesLocation;
	private Set<Integer> correctAnswers;
	
	public ImageMultipleChoiceQuestion(int id, String question, List<Image> answers, Set<Integer> correctAnswers){
		this.setId(id);
		this.setQuestion(question);
		this.setAnswers(answers);
		this.setCorrectAnswers(correctAnswers);
	}
	
	public ImageMultipleChoiceQuestion(String question, List<Image> answers, Set<Integer> correctAnswers){
		this.setQuestion(question);
		this.setAnswers(answers);
		this.setCorrectAnswers(correctAnswers);
	}
	
	public ImageMultipleChoiceQuestion(String question, Set<Integer> correctAnswers){
		this.setQuestion(question);
		this.setCorrectAnswers(correctAnswers);
	}
	
	
	public void addCorrectAnswer(int answer){
		correctAnswers.add(answer);
	}
	
	public void removeCorrectAnswer(int answer){
		correctAnswers.remove(answer);
	}

	public void addAnswerPossibility(Image answerPossibility){
		answerPossibilities.add(answerPossibility);
	}
	
	public void removeAnswerPossibility(Image answerPossibility){
		answerPossibilities.remove(answerPossibility);
	}
	



	/*
	 * GETTERS & SETTERS
	 */
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}


	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	
	
	public String getQuestion() {
		return question;
	}

	public void setQuestion(String question) {
		this.question = question;
	}

	public List<Image> getAnswers() {
		return answerPossibilities;
	}

	public void setAnswers(List<Image> answers) {
		this.answerPossibilities = answers;
	}

	public Set<Integer> getCorrectAnswers() {
		return correctAnswers;
	}

	public void setCorrectAnswers(Set<Integer> correctAnswers) {
		this.correctAnswers = correctAnswers;
	}

	/**
	 * @return the answerPossibilitiesLocation
	 */
	public List<String> getAnswerPossibilitiesLocation() {
		return answerPossibilitiesLocation;
	}

	/**
	 * @param answerPossibilitiesLocation the answerPossibilitiesLocation to set
	 */
	public void setAnswerPossibilitiesLocation(
			List<String> answerPossibilitiesLocation) {
		this.answerPossibilitiesLocation = answerPossibilitiesLocation;
	}
	
	
}
